import 'package:sports_new/entity/pay/usable_coupon.dart';

import '../../widgets/pay_bottom_sheet.dart';

class RechargeEntity {
  String? content;
  String? description;
  double? gold;
  String? id;
  double? payAmt;
  String? productId;
  String? tag;

  RechargeEntity(
      {this.content,
        this.description,
        this.gold,
        this.id,
        this.payAmt,
        this.productId,
        this.tag});

  RechargeEntity.fromJson(Map<String, dynamic> json) {
    content = json['content'];
    description = json['description'];
    gold = json['gold'];
    id = json['id'];
    payAmt = json['payAmt'];
    productId = json['productId'];
    tag = json['tag'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['content'] = this.content;
    data['description'] = this.description;
    data['gold'] = this.gold;
    data['id'] = this.id;
    data['payAmt'] = this.payAmt;
    data['productId'] = this.productId;
    data['tag'] = this.tag;
    return data;
  }
}

class PayEntity {
  String? id;
  int? createStatus;
  String? payCertificate;

  PayEntity({this.id, this.createStatus, this.payCertificate});

  PayEntity.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    createStatus = json['createStatus'];
    payCertificate = json['payCertificate'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['createStatus'] = this.createStatus;
    data['payCertificate'] = this.payCertificate;
    return data;
  }
}

class PayInfo{
  final String price;
  final PayScene payScene;
  final String buyId;
  final List<UsableCouponEntity>? coupons;

  const PayInfo({required this.price,required this.payScene,required this.buyId,this.coupons});
}

class PayResult{
  final UsableCouponEntity? coupon;
  final PayStatus toPay;

  const PayResult({required this.toPay,this.coupon});
}

class PayStatus{
  final int type;
  const PayStatus(this.type);

  static const PayStatus directPay = PayStatus(0);
  static const PayStatus goldPay = PayStatus(1);
  static const PayStatus recharge = PayStatus(2);
  static const PayStatus failed = PayStatus(3);


}
